import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

import login from '@/view/login'
import index from '@/view/index/index'
import menuList from '@/view/menu/menuList'
import hetong from '@/view/hetong/hetong'
import userList from '@/view/user/userList'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      meta:{require:false}
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      meta:{require:true},
      children:[

        { path: '/menuList',name: 'menuList',component: menuList,meta:{require:true} },
        { path: '/hetong',name: 'hetong',component: hetong,meta:{require:true} },
        { path: '/userList',name: 'userList',component: userList,meta:{require:true} }

      ]
    }
  ]
})
